home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_ddd.idb / usr / freeware / info / ddd.info-8.z / ddd.info-8
Text File  |  2001-10-09  |  37KB  |  1,112 lines

  1. This is ddd.info, produced by makeinfo version 4.0 from ddd.texi.
  2.  
  3. INFO-DIR-SECTION Miscellaneous
  4. START-INFO-DIR-ENTRY
  5. * DDD: (ddd).                     The Data Display Debugger.
  6. END-INFO-DIR-ENTRY
  7.  
  8. DDD is a graphical front-end for GDB and other command-line debuggers.
  9.  
  10. This is the First Edition, 2001-02-01, of `Debugging with DDD' for DDD
  11. Version 3.3.1.
  12.  
  13. Copyright (C) 2001 UniversitΣt Passau
  14. Lehrstuhl fⁿr Software-Systeme
  15. Innstra▀e 33
  16. D-94032 Passau
  17. GERMANY
  18.  
  19. Distributed by
  20. Free Software Foundation, Inc.
  21. 59 Temple Place - Suite 330
  22. Boston, MA 02111-1307
  23. USA
  24.  
  25. DDD and this manual are available via the DDD WWW page
  26. (http://www.gnu.org/software/ddd/).
  27.  
  28.    Permission is granted to copy, distribute and/or modify this document
  29. under the terms of the GNU Free Documentation License, Version 1.1 or
  30. any later version published by the Free Software Foundation; with no
  31. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.  A
  32. copy of the license is included in the section entitled "GNU Free
  33. Documentation License".
  34.  
  35.    Send questions, comments, suggestions, etc. to <ddd@gnu.org>.
  36. Send bug reports to <bug-ddd@gnu.org>.
  37. 
  38. File: ddd.info,  Node: Data Display Actions,  Next: Debugger Console Actions,  Prev: General Actions,  Up: Actions
  39.  
  40. Data Display Actions
  41. --------------------
  42.  
  43.    These actions are used in the DDD graph editor.
  44.  
  45.  - Action: end ()
  46.      End the action initiated by `select'.  Bound to a button up event.
  47.  
  48.  - Action: extend ()
  49.      Extend the current selection.  Bound to a button down event.
  50.  
  51.  - Action: extend-or-move ()
  52.      Extend the current selection.  Bound to a button down event.  If
  53.      the pointer is dragged, move the selection.
  54.  
  55.  - Action: follow ()
  56.      Continue the action initiated by `select'.  Bound to a pointer
  57.      motion event.
  58.  
  59.  - Action: graph-select ()
  60.      Equivalent to `select', but also updates the current argument.
  61.  
  62.  - Action: graph-select-or-move ()
  63.      Equivalent to `select-or-move', but also updates the current
  64.      argument.
  65.  
  66.  - Action: graph-extend ()
  67.      Equivalent to `extend', but also updates the current argument.
  68.  
  69.  - Action: graph-extend-or-move ()
  70.      Equivalent to `extend-or-move', but also updates the current
  71.      argument.
  72.  
  73.  - Action: graph-toggle ()
  74.      Equivalent to `toggle', but also updates the current argument.
  75.  
  76.  - Action: graph-toggle-or-move ()
  77.      Equivalent to `toggle-or-move', but also updates the current
  78.      argument.
  79.  
  80.  - Action: graph-popup-menu ([`graph'|`node'|`shortcut'])
  81.      Pops up a menu.  `graph' pops up a menu with global graph
  82.      operations, `node' pops up a menu with node operations, and
  83.      `shortcut' pops up a menu with display shortcuts.
  84.  
  85.      If no argument is given, pops up a menu depending on the context:
  86.      when pointing on a node with the <Shift> key pressed, behaves like
  87.      `shortcut'; when pointing on a without the <Shift> key pressed,
  88.      behaves like `node'; otherwise, behaves as if `graph' was given.
  89.  
  90.  - Action: graph-dereference ()
  91.      Dereference the selected display.
  92.  
  93.  - Action: graph-detail ()
  94.      Show or hide detail of the selected display.
  95.  
  96.  - Action: graph-rotate ()
  97.      Rotate the selected display.
  98.  
  99.  - Action: graph-dependent ()
  100.      Pop up a dialog to create a dependent display.
  101.  
  102.  - Action: hide-edges ([`any'|`both'|`from'|`to'])
  103.      Hide some edges.  `any' means to process all edges where either
  104.      source or target node are selected. `both' means to process all
  105.      edges where both nodes are selected. `from' means to process all
  106.      edges where at least the source node is selected. `to' means to
  107.      process all edges where at least the target node is selected.
  108.      Default is `any'.
  109.  
  110.  - Action: layout ([`regular'|`compact'], [[`+'|`-'] degrees])
  111.      Layout the graph.  `regular' means to use the regular layout
  112.      algorithm; `compact' uses an alternate layout algorithm, where
  113.      successors are placed next to their parents.  Default is
  114.      `regular'.  DEGREES indicates in which direction the graph should
  115.      be layouted.  Default is the current graph direction.
  116.  
  117.  - Action: move-selected (x-offset, y-offset)
  118.      Move all selected nodes in the direction given by X-OFFSET and
  119.      Y-OFFSET.  X-OFFSET and Y-OFFSET is either given as a numeric
  120.      pixel value, or as `+grid', or `-grid', meaning the current grid
  121.      size.
  122.  
  123.  - Action: normalize ()
  124.      Place all nodes on their positions and redraw the graph.
  125.  
  126.  - Action: rotate ([[`+'|`-']degrees])
  127.      Rotate the graph around DEGREES degrees.  DEGREES must be a
  128.      multiple of 90.  Default is `+90'.
  129.  
  130.  - Action: select ()
  131.      Select the node pointed at.  Clear all other selections.  Bound to
  132.      a button down event.
  133.  
  134.  - Action: select-all ()
  135.      Select all nodes in the graph.
  136.  
  137.  - Action: select-first ()
  138.      Select the first node in the graph.
  139.  
  140.  - Action: select-next ()
  141.      Select the next node in the graph.
  142.  
  143.  - Action: select-or-move ()
  144.      Select the node pointed at.  Clear all other selections.  Bound to
  145.      a button down event. If the pointer is dragged, move the selected
  146.      node.
  147.  
  148.  - Action: select-prev ()
  149.      Select the previous node in the graph.
  150.  
  151.  - Action: show-edges ([`any'|`both'|`from'|`to'])
  152.      Show some edges.  `any' means to process all edges where either
  153.      source or target node are selected. `both' means to process all
  154.      edges where both nodes are selected. `from' means to process all
  155.      edges where at least the source node is selected. `to' means to
  156.      process all edges where at least the target node is selected.
  157.      Default is `any'.
  158.  
  159.  - Action: snap-to-grid ()
  160.      Place all nodes on the nearest grid position.
  161.  
  162.  - Action: toggle ()
  163.      Toggle the current selection--if the node pointed at is selected,
  164.      it will be unselected, and vice versa.  Bound to a button down
  165.      event.
  166.  
  167.  - Action: toggle-or-move ()
  168.      Toggle the current selection--if the node pointed at is selected,
  169.      it will be unselected, and vice versa.  Bound to a button down
  170.      event.  If the pointer is dragged, move the selection.
  171.  
  172.  - Action: unselect-all ()
  173.      Clear the selection.
  174.  
  175. 
  176. File: ddd.info,  Node: Debugger Console Actions,  Next: Source Window Actions,  Prev: Data Display Actions,  Up: Actions
  177.  
  178. Debugger Console Actions
  179. ------------------------
  180.  
  181.    These actions are used in the debugger console and other text fields.
  182.  
  183.  - Action: gdb-backward-character ()
  184.      Move one character to the left.  Bound to `Left'.
  185.  
  186.  - Action: gdb-beginning-of-line ()
  187.      Move cursor to the beginning of the current line, after the prompt.
  188.      Bound to `HOME'.
  189.  
  190.  - Action: gdb-control (control-character)
  191.      Send the given CONTROL-CHARACTER to the inferior debugger.
  192.      CONTROL-CHARACTER must be specified in the form `^X', where X is
  193.      an upper-case letter, or `?'.
  194.  
  195.  - Action: gdb-command (command)
  196.      Execute COMMAND in the debugger console.  The following
  197.      replacements are performed on COMMAND:
  198.  
  199.         * If COMMAND has the form `NAME...', insert NAME, followed by a
  200.           space, in the debugger console.
  201.  
  202.         * All occurrences of `()' are replaced by the current contents
  203.           of the argument field `()'.
  204.  
  205.  
  206.  - Action: gdb-complete-arg (command)
  207.      Complete current argument as if COMMAND was prepended.  Bound to
  208.      <Ctrl+T>.
  209.  
  210.  - Action: gdb-complete-command ()
  211.      Complete current command line in the debugger console.  Bound to
  212.      <TAB>.
  213.  
  214.  - Action: gdb-complete-tab (command)
  215.      If global <TAB> completion is enabled, complete current argument
  216.      as if COMMAND was prepended.  Otherwise, proceed as if the <TAB>
  217.      key was hit.  Bound to <TAB>.
  218.  
  219.  - Action: gdb-delete-or-control (control-character)
  220.      Like `gdb-control', but effective only if the cursor is at the end
  221.      of a line.  Otherwise, CONTROL-CHARACTER is ignored and the
  222.      character following the cursor is deleted.  Bound to <Ctrl+D>.
  223.  
  224.  - Action: gdb-end-of-line ()
  225.      Move cursor to the end of the current line.  Bound to `End'.
  226.  
  227.  - Action: gdb-forward-character ()
  228.      Move one character to the right.  Bound to `Right'.
  229.  
  230.  - Action: gdb-insert-graph-arg ()
  231.      Insert the contents of the data display argument field `()'.
  232.  
  233.  - Action: gdb-insert-source-arg ()
  234.      Insert the contents of the source argument field `()'.
  235.  
  236.  - Action: gdb-interrupt ()
  237.      If DDD is in incremental search mode, exit it; otherwise call
  238.      `gdb-control(^C)'.
  239.  
  240.  - Action: gdb-isearch-prev ()
  241.      Enter reverse incremental search mode.  Bound to <Ctrl+B>.
  242.  
  243.  - Action: gdb-isearch-next ()
  244.      Enter incremental search mode.  Bound to <Ctrl+F>.
  245.  
  246.  - Action: gdb-isearch-exit ()
  247.      Exit incremental search mode.  Bound to <ESC>.
  248.  
  249.  - Action: gdb-next-history ()
  250.      Recall next command from history.  Bound to `Down'.
  251.  
  252.  - Action: gdb-prev-history ()
  253.      Recall previous command from history.  Bound to `Up'.
  254.  
  255.  - Action: gdb-previous-history ()
  256.      Recall previous command from history.  Bound to `Up'.
  257.  
  258.  - Action: gdb-process ([action [, args...]])
  259.      Process the given event in the debugger console.  Bound to key
  260.      events in the source and data window.  If this action is bound to
  261.      the source window, and the source window is editable, perform
  262.      `ACTION(ARGS...)' on the source window instead; if ACTION is not
  263.      given, perform `self-insert()'.
  264.  
  265.  - Action: gdb-select-all ()
  266.      If the `selectAllBindings' resource is set to `Motif', perform
  267.      `beginning-of-line'.  Otherwise, perform `select-all'.  Bound to
  268.      <Ctrl+A>.
  269.  
  270.  - Action: gdb-set-line (value)
  271.      Set the current line to VALUE.  Bound to <Ctrl+U>.
  272.  
  273. 
  274. File: ddd.info,  Node: Source Window Actions,  Prev: Debugger Console Actions,  Up: Actions
  275.  
  276. Source Window Actions
  277. ---------------------
  278.  
  279.    These actions are used in the source and code windows.
  280.  
  281.  - Action: source-delete-glyph ()
  282.      Delete the breakpoint related to the glyph at cursor position.
  283.  
  284.  - Action: source-double-click ([text-action [, line-action [,
  285.           function-action]]])
  286.      The double-click action in the source window.
  287.  
  288.         * If this action is taken on a breakpoint glyph, edit the
  289.           breakpoint properties.
  290.  
  291.         * If this action is taken in the breakpoint area, invoke
  292.           `gdb-command(LINE-ACTION)'.  If LINE-ACTION is not given, it
  293.           defaults to `break ()'.
  294.  
  295.         * If this action is taken in the source text, and the next
  296.           character following the current selection is `(', invoke
  297.           `gdb-command(FUNCTION-ACTION)'.  If FUNCTION-ACTION is not
  298.           given, it defaults to `list ()'.
  299.  
  300.         * Otherwise, invoke `gdb-command(TEXT-ACTION)'.  If TEXT-ACTION
  301.           is not given, it defaults to `graph display ()'.
  302.  
  303.  - Action: source-drag-glyph ()
  304.      Initiate a drag on the glyph at cursor position.
  305.  
  306.  - Action: source-drop-glyph ([action])
  307.      Drop the dragged glyph at cursor position.  ACTION is either
  308.      `move', meaning to move the dragged glyph, or `copy', meaning to
  309.      copy the dragged glyph.  If no ACTION is given, `move' is assumed.
  310.  
  311.  - Action: source-end-select-word ()
  312.      End selecting a word.
  313.  
  314.  - Action: source-follow-glyph ()
  315.      Continue a drag on the glyph at cursor position.  Usually bound to
  316.      some motion event.
  317.  
  318.  - Action: source-popup-menu ()
  319.      Pop up a menu, depending on the location.
  320.  
  321.  - Action: source-set-arg ()
  322.      Set the argument field to the current selection.  Typically bound
  323.      to some selection operation.
  324.  
  325.  - Action: source-start-select-word ()
  326.      Start selecting a word.
  327.  
  328.  - Action: source-update-glyphs ()
  329.      Update all visible glyphs.  Usually invoked after a scrolling
  330.      operation.
  331.  
  332. 
  333. File: ddd.info,  Node: Images,  Prev: Actions,  Up: Application Defaults
  334.  
  335. Images
  336. ======
  337.  
  338.    DDD installs a number of images that may be used as pixmap
  339. resources, simply by giving a symbolic name.  For button images, three
  340. variants are installed as well:
  341.  
  342.    * The suffix `-hi' indicates a highlighted variant (Button is
  343.      entered).
  344.  
  345.    * The suffix `-arm' indicates an armed variant (Button is pushed).
  346.  
  347.    * The suffix `-xx' indicates a disabled (insensitive) variant.
  348.  
  349.  - Image: break_at
  350.      `Break at ()' button.
  351.  
  352.  - Image: clear_at
  353.      `Clear at ()' button.
  354.  
  355.  - Image: ddd
  356.      DDD icon.
  357.  
  358.  - Image: delete
  359.      `Delete ()' button.
  360.  
  361.  - Image: disable
  362.      `Disable' button.
  363.  
  364.  - Image: dispref
  365.      `Display * ()' button.
  366.  
  367.  - Image: display
  368.      `Display ()' button.
  369.  
  370.  - Image: drag_arrow
  371.      The execution pointer (being dragged).
  372.  
  373.  - Image: drag_cond
  374.      A conditional breakpoint (being dragged).
  375.  
  376.  - Image: drag_stop
  377.      A breakpoint (being dragged).
  378.  
  379.  - Image: drag_temp
  380.      A temporary breakpoint (being dragged).
  381.  
  382.  - Image: enable
  383.      `Enable' button.
  384.  
  385.  - Image: find_forward
  386.      `Find>> ()' button.
  387.  
  388.  - Image: find_backward
  389.      `Find<< ()' button.
  390.  
  391.  - Image: grey_arrow
  392.      The execution pointer (not in lowest frame).
  393.  
  394.  - Image: grey_cond
  395.      A conditional breakpoint (disabled).
  396.  
  397.  - Image: grey_stop
  398.      A breakpoint (disabled).
  399.  
  400.  - Image: grey_temp
  401.      A temporary breakpoint (disabled).
  402.  
  403.  - Image: hide
  404.      `Hide ()' button.
  405.  
  406.  - Image: lookup
  407.      `Lookup ()' button.
  408.  
  409.  - Image: maketemp
  410.      `Make Temporary' button.
  411.  
  412.  - Image: new_break
  413.      `New Breakpoint' button.
  414.  
  415.  - Image: new_display
  416.      `New Display' button.
  417.  
  418.  - Image: new_watch
  419.      `New Watchpoint' button.
  420.  
  421.  - Image: plain_arrow
  422.      The execution pointer.
  423.  
  424.  - Image: plain_cond
  425.      A conditional breakpoint (enabled).
  426.  
  427.  - Image: plain_stop
  428.      A breakpoint (enabled).
  429.  
  430.  - Image: plain_temp
  431.      A temporary breakpoint (enabled).
  432.  
  433.  - Image: print
  434.      `Print ()' button.
  435.  
  436.  - Image: properties
  437.      `Properties' button.
  438.  
  439.  - Image: rotate
  440.      `Rotate ()' button.
  441.  
  442.  - Image: set
  443.      `Set ()' button.
  444.  
  445.  - Image: show
  446.      `Show ()' button.
  447.  
  448.  - Image: signal_arrow
  449.      The execution pointer (stopped by signal).
  450.  
  451.  - Image: undisplay
  452.      `Undisplay ()' button.
  453.  
  454.  - Image: unwatch
  455.      `Unwatch ()' button.
  456.  
  457.  - Image: watch
  458.      `Watch ()' button.
  459.  
  460. 
  461. File: ddd.info,  Node: Bugs,  Next: Configuration Notes,  Prev: Application Defaults,  Up: Top
  462.  
  463. Bugs and How To Report Them
  464. ***************************
  465.  
  466.    Sometimes you will encounter a bug in DDD.  Although we cannot
  467. promise we can or will fix the bug, and we might not even agree that it
  468. is a bug, we want to hear about bugs you encounter in case we do want to
  469. fix them.
  470.  
  471.    To make it possible for us to fix a bug, you must report it.  In
  472. order to do so effectively, you must know when and how to do it.
  473.  
  474. * Menu:
  475.  
  476. * Where to Send Bug Reports::   Our e-mail address.
  477. * Is it a DDD Bug?::         DDD may not be at fault.
  478. * How to Report Bugs::          Report all the facts.
  479. * Bug Reports::                 Include all configuration information.
  480. * Diagnostics::                 Maintaining DDD
  481.  
  482. 
  483. File: ddd.info,  Node: Where to Send Bug Reports,  Next: Is it a DDD Bug?,  Up: Bugs
  484.  
  485. Where to Send Bug Reports
  486. =========================
  487.  
  488.    Send bug reports for DDD via electronic mail to
  489.  
  490.      <bug-ddd@gnu.org>
  491.  
  492. 
  493. File: ddd.info,  Node: Is it a DDD Bug?,  Next: How to Report Bugs,  Prev: Where to Send Bug Reports,  Up: Bugs
  494.  
  495. Is it a DDD Bug?
  496. ================
  497.  
  498.    Before sending in a bug report, try to find out whether the problem
  499. cause really lies within DDD.  A common cause of problems are
  500. incomplete or missing X or M*tif installations, for instance, or bugs
  501. in the X server or M*tif itself.  Running DDD as
  502.  
  503.      $ ddd --check-configuration
  504.  
  505.    checks for common problems and gives hints on how to repair them.
  506.  
  507.    Another potential cause of problems is the inferior debugger;
  508. occasionally, they show bugs, too.  To find out whether a bug was
  509. caused by the inferior debugger, run DDD as
  510.  
  511.      $ ddd --trace
  512.  
  513.    This shows the interaction between DDD and the inferior debugger on
  514. standard error while DDD is running.  (If `--trace' is not given, this
  515. interaction is logged in the file `~/.ddd/log'; *note Logging::)
  516. Compare the debugger output to the output of DDD and determine which
  517. one is wrong.
  518.  
  519. 
  520. File: ddd.info,  Node: How to Report Bugs,  Next: Bug Reports,  Prev: Is it a DDD Bug?,  Up: Bugs
  521.  
  522. How to Report Bugs
  523. ==================
  524.  
  525.    Here are some guidelines for bug reports:
  526.  
  527.    * The fundamental principle of reporting bugs usefully is this:
  528.      *report all the facts*.  If you are not sure whether to state a
  529.      fact or leave it out, state it!
  530.  
  531.    * Keep in mind that the purpose of a bug report is to enable someone
  532.      to fix the bug if it is not known.  It is not very important what
  533.      happens if the bug is already known.  Therefore, always write your
  534.      bug reports on the assumption that the bug is not known.
  535.  
  536.    * Your bug report should be self-contained.  Do not refer to
  537.      information sent in previous mails; your previous mail may have
  538.      been forwarded to somebody else.
  539.  
  540.    * Please report each bug in a separate message.  This makes it easier
  541.      for us to track which bugs have been fixed and to forward your bugs
  542.      reports to the appropriate maintainer.
  543.  
  544.    * Please report bugs in English; this increases the chances of
  545.      finding someone who can fix the bug.  Do not assume one particular
  546.      person will receive your bug report.
  547.  
  548. 
  549. File: ddd.info,  Node: Bug Reports,  Next: Diagnostics,  Prev: How to Report Bugs,  Up: Bugs
  550.  
  551. What to Include in a Bug Report
  552. ===============================
  553.  
  554.    To enable us to fix a DDD bug, you _must_ include the following
  555. information:
  556.  
  557.    * Your DDD configuration.  Invoke DDD as
  558.  
  559.           $ ddd --configuration
  560.  
  561.      to get the configuration information.  If this does not work,
  562.      please include at least the DDD version, the type of machine you
  563.      are using, and its operating system name and version number.
  564.  
  565.    * The debugger you are using and its version (e.g., `gdb-4.17' or
  566.      `dbx as shipped with Solaris 2.6').
  567.  
  568.    * The compiler you used to compile DDD and its version (e.g.,
  569.      `gcc-2.8.1').
  570.  
  571.    * A description of what behavior you observe that you believe is
  572.      incorrect.  For example, "DDD gets a fatal signal" or "DDD exits
  573.      immediately after attempting to create the data window".
  574.  
  575.    * A _log file_ showing the interaction between DDD and the inferior
  576.      debugger.  By default, this interaction is logged in the file
  577.      `~/.ddd/log'.  Include all trace output from the DDD invocation up
  578.      to the first bug occurrence; insert own comments where necessary.
  579.  
  580.    * If you wish to suggest changes to the DDD source, send us context
  581.      diffs.  If you even discuss something in the DDD source, refer to
  582.      it by context, _never_ by line number.
  583.  
  584.    Be sure to include this information in _every_ single bug report.
  585.  
  586. 
  587. File: ddd.info,  Node: Diagnostics,  Prev: Bug Reports,  Up: Bugs
  588.  
  589. Getting Diagnostics
  590. ===================
  591.  
  592. * Menu:
  593.  
  594. * Logging::                     DDD logs all interactions.
  595. * Debugging DDD::            Facilities to debug DDD.
  596. * Customizing Diagnostics::     All diagnostics resources.
  597.  
  598. 
  599. File: ddd.info,  Node: Logging,  Next: Debugging DDD,  Up: Diagnostics
  600.  
  601. Logging
  602. -------
  603.  
  604.    If things go wrong, the first and most important information source
  605. is the "DDD log file".  This file, created in `~/.ddd/log' (`~' stands
  606. for your home directory), records the following information:
  607.  
  608.    * Your DDD configuration (at the top)
  609.  
  610.    * All programs invoked by DDD, shown as `$  PROGRAM ARGS...'
  611.  
  612.    * All DDD messages, shown as `#  MESSAGE'.
  613.  
  614.    * All information sent from DDD to the inferior debugger, shown as
  615.      `-> TEXT'.
  616.  
  617.    * All information sent from the inferior debugger standard output to
  618.      DDD, shown as `<- TEXT'.
  619.  
  620.    * All information sent from the inferior debugger standard error to
  621.      DDD, shown as `<= TEXT'.(1)
  622.  
  623.    * All information sent from DDD to Gnuplot, shown as `>> TEXT'.
  624.  
  625.    * All information sent from Gnuplot standard output to DDD, shown as
  626.      `<< TEXT'.
  627.  
  628.    * All information sent from Gnuplot standard error to DDD, shown as
  629.      `<= TEXT'.
  630.  
  631.    * If DDD crashes, a GDB backtrace of the DDD core dump is included
  632.      at the end.
  633.  
  634.    This information, all in one place, should give you (and anyone
  635. maintaining DDD) a first insight of what's going wrong.
  636.  
  637. * Menu:
  638.  
  639. * Disabling Logging::
  640.  
  641.    ---------- Footnotes ----------
  642.  
  643.    (1) Since the inferior debugger is invoked through a virtual TTY,
  644. standard error is normally redirected to standard output, so DDD never
  645. receives standard error from the inferior debugger.
  646.  
  647. 
  648. File: ddd.info,  Node: Disabling Logging,  Up: Logging
  649.  
  650. Disabling Logging
  651. .................
  652.  
  653.    The log files created by DDD can become quite large, so you might
  654. want to turn off logging.  There is no explicit DDD feature that allows
  655. you to do that.  However, you can easily create a _symbolic link_ from
  656. `~/.ddd/log' to `/dev/null', such that logging information is lost.
  657. Enter the following commands at the shell prompt:
  658.  
  659.      $ cd
  660.      $ rm .ddd/log
  661.      $ ln -s /dev/null .ddd/log
  662.  
  663.    Be aware, though, that having logging turned off makes diagnostics
  664. much more difficult; in case of trouble, it may be hard to reproduce the
  665. error.
  666.  
  667. 
  668. File: ddd.info,  Node: Debugging DDD,  Next: Customizing Diagnostics,  Prev: Logging,  Up: Diagnostics
  669.  
  670. Debugging DDD
  671. -------------
  672.  
  673.    As long as DDD is compiled with `-g' (*note Compiling for
  674. Debugging::), you can invoke a debugger on DDD--even DDD itself, if you
  675. wish.  From within DDD, a special `Maintenance' menu is provided that
  676. invokes GDB on the running DDD process.  *Note Maintenance Menu::, for
  677. details.
  678.  
  679.    The DDD distribution comes with a `.gdbinit' file that is suitable
  680. for debugging DDD.  Among others, this defines a `ddd' command that
  681. sets up an environment for debugging DDD and a `string' command that
  682. lets you print the contents of DDD `string' variables; just use `print
  683. VAR' followed by `string'.
  684.  
  685.    You can cause DDD to dump core at any time by sending it a `SIGUSR1'
  686. signal.  DDD resumes execution while you can examine the core file with
  687. GDB.
  688.  
  689.    When debugging DDD, it can be useful to make DDD not catch fatal
  690. errors.  This can be achieved by setting the environment variable
  691. `DDD_NO_SIGNAL_HANDLERS' before invoking DDD.
  692.  
  693. 
  694. File: ddd.info,  Node: Customizing Diagnostics,  Prev: Debugging DDD,  Up: Diagnostics
  695.  
  696. Customizing Diagnostics
  697. -----------------------
  698.  
  699.    You can use these additional resources to obtain diagnostics about
  700. DDD.  Most of them are tied to a particular invocation option.
  701.  
  702.  - Resource: appDefaultsVersion (class Version)
  703.      The version of the DDD app-defaults file.  If this string does not
  704.      match the version of the current DDD executable, DDD issues a
  705.      warning.
  706.  
  707.  - Resource: checkConfiguration (class CheckConfiguration)
  708.      If `on', check the DDD environment (in particular, the X
  709.      configuration), report any possible problem causes and exit.
  710.      *Note Options::, for the `--check-configuration' option.
  711.  
  712.  - Resource: dddinitVersion (class Version)
  713.      The version of the DDD executable that last wrote the
  714.      `~/.ddd/init' file.  If this string does not match the version of
  715.      the current DDD executable, DDD issues a warning.
  716.  
  717.  - Resource: debugCoreDumps (class DebugCoreDumps)
  718.      If `on', DDD invokes a debugger on itself when receiving a fatal
  719.      signal.  *Note Maintenance Menu::, for setting this resource.
  720.  
  721.  - Resource: dumpCore (class DumpCore)
  722.      If `on' (default), DDD dumps core when receiving a fatal signal.
  723.      *Note Maintenance Menu::, for setting this resource.
  724.  
  725.  - Resource: maintenance (class Maintenance)
  726.      If `on', enables the top-level `Maintenance' menu (*note
  727.      Maintenance Menu::) with additional options.  *Note Options::, for
  728.      the `--maintenance' option.
  729.  
  730.  - Resource: showConfiguration (class ShowConfiguration)
  731.      If `on', show the DDD configuration on standard output and exit.
  732.      *Note Options::, for the `--configuration' option.
  733.  
  734.  - Resource: showFonts (class ShowFonts)
  735.      If `on', show the DDD font definitions on standard output and
  736.      exit.  *Note Options::, for the `--fonts' option.
  737.  
  738.  - Resource: showInvocation (class ShowInvocation)
  739.      If `on', show the DDD invocation options on standard output and
  740.      exit.  *Note Options::, for the `--help' option.
  741.  
  742.  - Resource: showLicense (class ShowLicense)
  743.      If `on', show the DDD license on standard output and exit.  *Note
  744.      Options::, for the `--license' option.
  745.  
  746.  - Resource: showManual (class ShowManual)
  747.      If `on', show this DDD manual page on standard output and exit.
  748.      If the standard output is a terminal, the manual page is shown in a
  749.      pager (`$PAGER', `less' or `more').  *Note Options::, for the
  750.      `--manual' option.
  751.  
  752.  - Resource: showNews (class ShowNews)
  753.      If `on', show the DDD news on standard output and exit.  *Note
  754.      Options::, for the `--news' option.
  755.  
  756.  - Resource: showVersion (class ShowVersion)
  757.      If `on', show the DDD version on standard output and exit.  *Note
  758.      Options::, for the `--version' option.
  759.  
  760.  - Resource: suppressWarnings (class SuppressWarnings)
  761.      If `on', X warnings are suppressed.  This is sometimes useful for
  762.      executables that were built on a machine with a different X or
  763.      M*tif configuration.  By default, this is `off'.  *Note X
  764.      Warnings::, for details.
  765.  
  766.  - Resource: trace (class Trace)
  767.      If `on', show the dialog between DDD and the inferior debugger on
  768.      standard output.  Default is `off'.  *Note Options::, for the
  769.      `--trace' option.
  770.  
  771. 
  772. File: ddd.info,  Node: Configuration Notes,  Next: Dirty Tricks,  Prev: Bugs,  Up: Top
  773.  
  774. Configuration Notes
  775. *******************
  776.  
  777. * Menu:
  778.  
  779. * GDB::                         Using DDD with GDB
  780. * DBX::                         Using DDD with DBX
  781. * Ladebug::                     Using DDD with Ladebug
  782. * XDB::                         Using DDD with XDB
  783. * JDB::                         Using DDD with JDB
  784. * Perl::                        Using DDD with Perl
  785. * LessTif::                     Using DDD with LessTif
  786.  
  787. 
  788. File: ddd.info,  Node: GDB,  Next: DBX,  Up: Configuration Notes
  789.  
  790. Using DDD with GDB
  791. ==================
  792.  
  793.    Some GDB settings are essential for DDD to work correctly.  These
  794. settings with their correct values are:
  795.      set height 0
  796.      set width 0
  797.      set verbose off
  798.      set prompt (gdb)
  799.  
  800.    DDD sets these values automatically when invoking GDB; if these
  801. values are changed, there may be some malfunctions, especially in the
  802. data display.
  803.  
  804.    When debugging at the machine level with GDB 4.12 and earlier as
  805. inferior debugger, use a `display /x $pc' command to ensure the program
  806. counter value is updated correctly at each stop.  You may also enter
  807. the command in `~/.gdbinit' or (better yet) upgrade to the most recent
  808. GDB version.
  809.  
  810.    Further information is available on the following GDB variants:
  811.  
  812. * Menu:
  813.  
  814. * WDB::                         Using DDD with WDB
  815. * WindRiver GDB::               Using DDD with WindRiver GDB (Tornado)
  816.  
  817. 
  818. File: ddd.info,  Node: WDB,  Next: WindRiver GDB,  Up: GDB
  819.  
  820. Using DDD with WDB
  821. ------------------
  822.  
  823.    HP's WildeBeest (WDB) is essentially a variant of GDB.  To start DDD
  824. with WDB as inferior debugger, use
  825.  
  826.      ddd --wdb PROGRAM
  827.  
  828.    *Note GDB::, for further configuration notes.
  829.  
  830. 
  831. File: ddd.info,  Node: WindRiver GDB,  Prev: WDB,  Up: GDB
  832.  
  833. Using DDD with WindRiver GDB (Tornado)
  834. --------------------------------------
  835.  
  836.    DDD now supports WindRiver's version of GDB.(1) DDD can be
  837. integrated into the `Launch' window by placing the `launch.tcl' script
  838. (see below) into the the directory `~/.wind'.
  839.  
  840.    Currently, DDD only supports the PowerPC and has been only tested on
  841. a Solaris 2.6 host.
  842.  
  843.    DDD launches the version of GDB that is either in the current path,
  844. or the one specified on the command line using the `--debugger' command.
  845.  
  846.    Normally, the Tornado environment is set up by sourcing a script file
  847. which, among other things, sets up the PATH variable.
  848.  
  849.    It is suggested that a soft link for the version of GDB used for the
  850. target (i.e. `gdbppc') be made in the same directory:
  851.  
  852.      bin>ls -l gdb*
  853.      39 Mar  6 16:14 gdb -> /usr/wind/host/sun4-solaris2/bin/gdbppc*
  854.      1619212 Mar 11  1997 gdbppc*
  855.  
  856.    This way DDD will start the correct version of GDB automatically.
  857.  
  858.    It is also suggested that you use DDD's execution window to
  859. facilitate parsing of GDB output.  *Note Debugger Communication::, for
  860. details.
  861.  
  862.    Tornado reads the default TCL scripts first, then the ones in the
  863. users `.wind' directory.  The following procedures can be cut and
  864. pasted into the user's `launch.tcl' file:
  865.  
  866.      # Launch.tcl - Launch application Tcl user customization file.
  867.      #
  868.      
  869.      ######
  870.      #
  871.      # setupDDD - sets up DDD for use by the launcher
  872.      #
  873.      # This routine adds the DDD to the application bar
  874.      #
  875.      # SYNOPSIS:
  876.      # setupDDD
  877.      #
  878.      # PARAMETERS: N/A
  879.      #
  880.      # RETURNS: N/A
  881.      #
  882.      # ERRORS: N/A
  883.      #
  884.      
  885.      proc setupDDD {} {
  886.          # Add to the default application bar
  887.          objectCreate app ddd DDD {launchDDD}
  888.      }
  889.      
  890.      ######
  891.      #
  892.      # launchDDD - launch the DDD debugger
  893.      #
  894.      # SYNOPSIS:
  895.      # launchDDD
  896.      #
  897.      # PARAMETERS: N/A
  898.      #
  899.      # RETURNS: N/A
  900.      #
  901.      # ERRORS: N/A
  902.      #
  903.      
  904.      proc launchDDD {} {
  905.      
  906.          global tgtsvr_selected
  907.          global tgtsvr_cpuid
  908.      
  909.          if {$tgtsvr_selected == "" || $tgtsvr_cpuid == 0} {
  910.              noticePost error "Select an attached target first."
  911.              return
  912.          }
  913.      
  914.          set startFileName /tmp/dddstartup.[pid]
  915.      
  916.          if [catch {open $startFileName w} file] {
  917.               # couldn't create a startup file.  Oh, well.
  918.               exec ddd --gdb &
  919.          }
  920.          else
  921.          {
  922.               # write out a little /tmp file that attaches to the
  923.               # selected target server and then deletes itself.
  924.               puts $file "set wtx-tool-name ddd"
  925.               puts $file "target wtx $tgtsvr_selected"
  926.               puts $file "tcl exec rm $startFileName"
  927.               close $file
  928.               exec ddd --gdb --command=$startFileName &
  929.          }
  930.      }
  931.      
  932.      ######
  933.      #
  934.      # Launch.tcl - Initialization
  935.      #
  936.      # The user's resource file sourced from the initial Launch.tcl
  937.      #
  938.      
  939.      # Add DDD to the laucher
  940.        setupDDD
  941.  
  942. In order for DDD to automatically display the source of a previously
  943. loaded file, the entry point must be named either `vxworks_main' or
  944. `main_vxworks'.
  945.  
  946.    *Note GDB::, for further configuration notes.
  947.  
  948.    ---------- Footnotes ----------
  949.  
  950.    (1) This section was contributed by Gary Cliff from Computing
  951. Devices Canada Ltd., <gary.cliff@cdott.com>.
  952.  
  953. 
  954. File: ddd.info,  Node: DBX,  Next: Ladebug,  Prev: GDB,  Up: Configuration Notes
  955.  
  956. Using DDD with DBX
  957. ==================
  958.  
  959.    When used for debugging Pascal-like programs, DDD does not infer
  960. correct array subscripts and always starts to count with 1.
  961.  
  962.    With some DBX versions (notably Solaris DBX), DDD strips C-style and
  963. C++-style comments from the DBX output in order to interpret it
  964. properly.  This also affects the output of the debugged program when
  965. sent to the debugger console.  Using the separate execution window
  966. avoids these problems.
  967.  
  968.    In some DBX versions (notably DEC DBX and AIX DBX), there is no
  969. automatic data display.  As an alternative, DDD uses the DBX `print'
  970. command to access data values.  This means that variable names are
  971. interpreted according to the current frame; variables outside the
  972. current frame cannot be displayed.
  973.  
  974. 
  975. File: ddd.info,  Node: Ladebug,  Next: XDB,  Prev: DBX,  Up: Configuration Notes
  976.  
  977. Using DDD with Ladebug
  978. ======================
  979.  
  980.    All DBX limitations (*note DBX::) apply to Ladebug as well.
  981.  
  982. 
  983. File: ddd.info,  Node: XDB,  Next: JDB,  Prev: Ladebug,  Up: Configuration Notes
  984.  
  985. Using DDD with XDB
  986. ==================
  987.  
  988.    There is no automatic data display in XDB.  As a workaround, DDD
  989. uses the `p' command to access data values.  This means that variable
  990. names are interpreted according to the current frame; variables outside
  991. the current frame cannot be displayed.
  992.  
  993. 
  994. File: ddd.info,  Node: JDB,  Next: Perl,  Prev: XDB,  Up: Configuration Notes
  995.  
  996. Using DDD with JDB
  997. ==================
  998.  
  999.    There is no automatic data display in JDB.  As a workaround, DDD
  1000. uses the `dump' command to access data values.  This means that
  1001. variable names are interpreted according to the current frame;
  1002. variables outside the current frame cannot be displayed.
  1003.  
  1004.    In JDB 1.1, the `dump' and `print' commands do not support
  1005. expression evaluation.  Hence, you cannot display arbitrary expressions.
  1006.  
  1007.    Parsing of JDB output is quite CPU-intensive, due to the recognition
  1008. of asynchronous prompts (any thread may output anything at any time,
  1009. including prompts).  Hence, a program producing much console output is
  1010. likely to slow down DDD considerably.  In such a case, have the program
  1011. run with `-debug' in a separate window and attach JDB to it using the
  1012. `-passwd' option.
  1013.  
  1014. 
  1015. File: ddd.info,  Node: Perl,  Next: LessTif,  Prev: JDB,  Up: Configuration Notes
  1016.  
  1017. Using DDD with Perl
  1018. ===================
  1019.  
  1020.    There is no automatic data display in Perl.  As a workaround, DDD
  1021. uses the `x' command to access data values.  This means that variable
  1022. names are interpreted according to the current frame; variables outside
  1023. the current frame cannot be displayed.
  1024.  
  1025. 
  1026. File: ddd.info,  Node: LessTif,  Prev: Perl,  Up: Configuration Notes
  1027.  
  1028. Using DDD with LessTif
  1029. ======================
  1030.  
  1031.    DDD includes a number of hacks that make DDD run with _LessTif,_ a
  1032. free M*tif library without loss of functionality.  Since a DDD binary
  1033. may be dynamically bound and used with either an OSF/Motif or LessTif
  1034. library, these _lesstif hacks_ can be enabled and disabled at run time.
  1035.  
  1036.    Whether the _lesstif hacks_ are included at run-time depends on the
  1037. setting of the `lessTifVersion' resource:
  1038.  
  1039.  - Resource: lessTifVersion (class LessTifVersion)
  1040.      Indicates the LessTif version DDD is running against.  For LessTif
  1041.      version X.Y, the value is X multiplied by 1000 plus Y--for
  1042.      instance, the value `79' stands for LessTif 0.79 and the value
  1043.      `1005' stands for LessTif 1.5.
  1044.  
  1045.      If the value of this resource is less than 1000, indicating LessTif
  1046.      0.99 or earlier, DDD enables version-specific hacks to make DDD
  1047.      work around LessTif bugs and deficiencies.
  1048.  
  1049.      If DDD was compiled against LessTif, the default value is the
  1050.      value of the `LessTifVersion' macro in `<Xm/Xm.h>'.  If DDD was
  1051.      compiled against OSF/Motif, the default value is `1000', disabling
  1052.      all LessTif-specific hacks.
  1053.  
  1054.    To set the `lessTifVersion' resource at DDD invocation and to
  1055. specify the version number of the LessTif library, you can also use the
  1056. option `--lesstif-version' VERSION.
  1057.  
  1058.    The default value of the `lessTifVersion' resource is derived from
  1059. the LessTif library DDD was compiled against (or `1000' when compiled
  1060. against OSF/Motif).  Hence, you normally don't need to worry about the
  1061. value of this resource.  However, if you use a dynamically linked DDD
  1062. binary with a library other than the one DDD was compiled against, you
  1063. must specify the version number of the library using this resource.
  1064. (Unfortunately, DDD cannot detect this at run-time.)
  1065.  
  1066.    Here are a few scenarios to illustrate this scheme:
  1067.    * Your DDD binary was compiled against OSF/Motif, but you use a
  1068.      LessTif 0.88 dynamic library instead.  Invoke DDD with
  1069.      `--lesstif-version 88'.
  1070.  
  1071.    * Your DDD binary was compiled against LessTif, but you use a
  1072.      OSF/Motif dynamic library instead.    Invoke DDD with
  1073.      `--lesstif-version 1000'.
  1074.  
  1075.    * Your DDD binary was compiled against LessTif 0.85, and you have
  1076.      upgraded to LessTif 0.90.  Invoke DDD with `--lesstif-version 90'.
  1077.  
  1078.    To find out the LessTif or OSF/Motif version DDD was compiled
  1079. against, invoke DDD with the `--configuration' option.
  1080.  
  1081.    In the DDD source, LessTif-specific hacks are controlled by the
  1082. string `lesstif_version'.
  1083.  
  1084. 
  1085. File: ddd.info,  Node: Dirty Tricks,  Next: Extending,  Prev: Configuration Notes,  Up: Top
  1086.  
  1087. Dirty Tricks
  1088. ************
  1089.  
  1090.    Do you miss anything in this manual?  Do you have any material that
  1091. should be added?  Please send any contributions to <ddd@gnu.org>.
  1092.  
  1093. 
  1094. File: ddd.info,  Node: Extending,  Next: FAQ,  Prev: Dirty Tricks,  Up: Top
  1095.  
  1096. Extending DDD
  1097. *************
  1098.  
  1099.    If you have any contributions to be incorporated into DDD, please
  1100. send them to <ddd@gnu.org>.  For suggestions on what might be done, see
  1101. the file `TODO' in the DDD distribution.
  1102.  
  1103. 
  1104. File: ddd.info,  Node: FAQ,  Next: License,  Prev: Extending,  Up: Top
  1105.  
  1106. Frequently Answered Questions
  1107. *****************************
  1108.  
  1109.    See the DDD WWW page (http://www.gnu.org/software/ddd/) for
  1110. frequently answered questions not covered in this manual.
  1111.  
  1112.